import {imageUrl} from "../request/config";
import {defineStore} from "pinia";

export const common = defineStore('common', () => {
    //页面跳转
    const navigateTo = (url) => {
        uni.navigateTo({
            url
        })
    }
    //图片路径
    const imagePath = (name, suffix = 'png',path='') => {
        return imageUrl +path+ name + '.' + suffix
    }
    return {
        navigateTo,
        imagePath
    }
})